from django import forms

class LoginForm(forms.Form):
    email = forms.EmailField(label='Email',
                             error_messages={'required': '请输入用户名'},
                             widget=forms.EmailInput(
                                 attrs={
                                     'placeholder': 'Email',
                                     'class': 'form-control'
                                 }
                             ))

    password = forms.CharField(label='密码',
                             error_messages={'required': '请输入密码'},
                             widget=forms.PasswordInput(
                                 attrs={
                                     'placeholder': '密码',
                                     'class':'form-control'
                                 }
                             ))

class DjangoForm(forms.Form):
    email = forms.EmailField(label='Email',
                             error_messages={'required': '请输入用户名'},
                             widget=forms.EmailInput(
                                 attrs={
                                     'placeholder': 'Email',
                                     'class': 'form-control'
                                 }
                             ))

    username = forms.CharField(label='用户名',
                           error_messages={'required': '请输入用户名'},
                           widget=forms.TextInput(
                               attrs={
                                   'placeholder': '用户名',
                                   'class': 'form-control'
                               }
                           ))


    password = forms.CharField(label='密码',
                               error_messages={'required': '请输入密码'},
                               widget=forms.PasswordInput(
                                   attrs={
                                       'placeholder': '密码',
                                       'class': 'form-control'
                                   }
                               ))
    password2 = forms.CharField(label='密码',
                               error_messages={'required': '请输入密码'},
                               widget=forms.PasswordInput(
                                   attrs={
                                       'placeholder': '请再输入密码',
                                       'class': 'form-control'
                                   }
                               ))


